package com.chaofan.websocket.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chaofan.websocket.entity.PrizeRecord;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

@Component
public interface PrizeRecordMapper extends BaseMapper<PrizeRecord> {

    @Select("SELECT * FROM admin_prize_record where prize_time is not NULL and state=1\n" +
            "ORDER BY prize_time DESC limit 1")
    PrizeRecord getMaxPrizeRecordByPrizeTime();

}
